﻿@model ProjectManager.Models.Project
<script type="text/javascript">
    $(document).ready(function () {
        $('#Deadline').datepicker({ dateFormat: "yy-mm-dd" });
    });
</script>

<h2>Project Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Project</legend>

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            Course name
        </div>
        <div class="editor-field">
<<<<<<< .mine
            @Model.CourseId
=======
            @Html.DropDownListFor(model => model.CourseId, new SelectList(ViewBag.courses, "Id", "Name"))
            @Html.ValidationMessageFor(model => model.CourseId)
>>>>>>> .r3
        </div>

        <div class="editor-label">
            Project No
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ProjectNo)
            @Html.ValidationMessageFor(model => model.ProjectNo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Deadline)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Deadline)
            @Html.ValidationMessageFor(model => model.Deadline)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Projects")
</div>

